<template>
    <div class="text-light-50 " style="font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;">
        {{ d.num.toFixed(0) }}
    </div>
</template>
<script >
import gsap from "gsap"

export default {
    name: 'centerBox',
    props:['value'],
    data() {
        return {
            d:{
                num: 0 
            }
        }
    },  
    watch:{
        value(){
            this.AnimateToValue()
        }
    },
    mounted() {
        this.AnimateToValue()
    },
    methods: {
         AnimateToValue() {
    gsap.to(this.d, {
        duration: 5,
        num: this.value
    })
}
    }
  }











</script>
